#define _CRT_SECURE_NO_WARNINGS 1

#include "heap.h"

void test1()
{
	Heap hp;
	HeapInit(&hp);
	HeapPush(&hp, 4);
	HeapPush(&hp, 3);
	HeapPush(&hp, 2);
	HeapPush(&hp, 1);
	HeapPrint(&hp);

	HeapPop(&hp);
	HeapPrint(&hp);
	HeapPop(&hp);
	HeapPrint(&hp);
	HeapPop(&hp);
	HeapPrint(&hp);

	//HeapPop(&hp);
	//HeapPrint(&hp);
	//HeapPop(&hp);
	//HeapPrint(&hp);

	HeapDestroy(&hp);
}


void testheapsort()
{
	int arr[] = { 6,1,2,7,9,3,4,5,10,8 };
	int len = sizeof(arr) / sizeof(arr[0]);
	HeapSort(arr, len);
	for (int i = 0; i < len; i++)
	{
		printf("%d ", arr[i]);
	}
	printf("\n");

}


int main()
{
	//test1();
	//testheapsort();
	return 0;
}